#!/usr/bin/node

const log = console.log,
      info = process.argv[2];

try{
  if(process.argv.length !== 3){
    console.error('命令行格式：cmd base64_string');
    process.exit(1);
  }

  let buf = new Buffer(info,'base64');
  let usr = buf.toString('utf8').split(':');

  if(usr.length !== 2){
    console.eeror('信息有误！');
    process.exit(2);
  } 

  log('name:%s\npassword:%s',usr[0],usr[1]);
}catch(e){
  console.error('something wrong!');
}
